use dbus;
use dbus::arg;
use dbus::nonblock;

pub trait OrgBluezNetworkServer1 {
    fn register(&self, uuid: &str, bridge: &str) -> nonblock::MethodReply<()>;
    fn unregister(&self, uuid: &str) -> nonblock::MethodReply<()>;
}

impl<'a, T: nonblock::NonblockReply, C: ::std::ops::Deref<Target = T>> OrgBluezNetworkServer1
    for nonblock::Proxy<'a, C>
{
    fn register(&self, uuid: &str, bridge: &str) -> nonblock::MethodReply<()> {
        self.method_call("org.bluez.NetworkServer1", "Register", (uuid, bridge))
    }

    fn unregister(&self, uuid: &str) -> nonblock::MethodReply<()> {
        self.method_call("org.bluez.NetworkServer1", "Unregister", (uuid,))
    }
}
